<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>

<script type="text/javascript">
function validate(){
	var s1=document.getElementById("p1").value

	var s2=document.getElementById("p1").value
	if(s1 == s2){
		alert("allowed");
	}
	else{

		alert("not allowed");
	}
	
}
</script>
</head>
<body>
<form>
<table align="center">
	<tr>
	Password <input type="password"></input>
	</tr>
	<br>
	<br>
	<tr>
	New Password <input type="password" name="p1" id= "p1" size="20"></input>
	</tr>
	<br>
	<br>
	<tr>
	Retype New Password<input type="password" name="p2" id="p2" size="20"  onblur="validate()"></input>
	</tr>
	<br>
	<br>
	<tr>
	<input type="submit" value="submit" size="20"></input>&nbsp&nbsp&nbsp&nbsp&nbsp
	<input type="button" value="back" size="20"></input>
	</tr>
	
	
</table>
</form>
</body>
</html>